import { Matrix4 } from "../../utils/Matrix4";

/*
 * @Author: Snow
 * @Date: 2021-10-20 19:54:36
 * @Description: 
 */
export class TRS {
    private position: number[];
    private rotation: number[];
    private scale: number[];

    constructor(position = [0, 0, 0], rotation = [0, 0, 0, 1], scale = [1, 1, 1]) {
        this.position = position;
        this.rotation = rotation;
        this.scale = scale;
    }

    public getMatrix(dst: number[] | Float32Array): number[] | Float32Array {
        dst = dst || new Float32Array(16);
        Matrix4.compose(this.position, this.rotation, this.scale, dst);
        return dst;
    }
}